﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UCF.Core
{
    public class DataConvert
    {
        /// <summary>
        /// 截取字符串
        /// </summary>
        /// <param name="s"></param>
        /// <param name="length"></param>
        /// <returns></returns>
        public static string SubText(string s, int length = 12)
        {
            return s.SubText(0, length);
        }

        /// <summary>
        /// 格式化货币输出
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        public static string ToCurrency(object v)
        {
            return v.ToString().ToDecimal().ToString("0.00");
        }
    }
}
